<!--
  Generated template for the WorkerCompletionRecordPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>完工记录</ion-title>
    <ion-buttons end>
      <button ion-button icon-only (click)="presentPopover($event)">
        <ion-icon name="more"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>


<ion-content>

  <ion-list>

    <ion-item class="w06">
      <ion-label>日期始:</ion-label>
      <ion-datetime displayFormat="YYYY-MM-DD" pickerFormat="YYYY-MM-DD" doneText="确定" cancelText="取消" max="{{max}}"
                    [(ngModel)]="timeStarts" (ngModelChange)="timeQuery()" ></ion-datetime>
    </ion-item>
    <ion-item class="w06">
      <ion-label>日期止:</ion-label>
      <ion-datetime displayFormat="YYYY-MM-DD" pickerFormat="YYYY-MM-DD" doneText="确定" cancelText="取消"  max="{{max}}"
                    [(ngModel)]="timeEnds" (ngModelChange)="timeQuery()"></ion-datetime>
    </ion-item>

    <ng-container *ngFor="let data of datas;let i = index">
      <ion-item class="mt15" (click)="push('WorkerCompletionRecordItemPage',data)" >
        <ion-label class="text_hide_none">
          <span class="w08 "><span class="font_gray" >单号：</span>{{data.ID}}</span>
          <span class="w08 " ><span class="font_gray" >业务单号：</span>{{data.ORDERID}}</span>
          <span class="w08 "><span class="font_gray" >客户姓名：</span>{{data.NAME}}</span>
          <span class="w08 "><span class="font_gray" >联系电话：</span>{{data.MOBILE}}</span>
          <span class="w08 "><span class="font_gray" >联系地址：</span>{{data.ADDRESS}}</span>
          <!--<div class="w04 fr tr font_size_large font_red font_weight_bold">-->
          <!--￥{{data.JE}}
        </div>-->
          <span class="w08 mt5 "><span class="font_gray" >完工时间：</span>{{data.SIGNED}}</span>
            <span class="w08 mt5 "><span class="font_gray" >回执时间：</span>{{data.RETURNED}}</span>
        </ion-label>
      </ion-item>
      <ion-item *ngFor="let product of data.SPLB">
        <ion-label class="mt10 mb10 text_hide_none">
          <span class="w10">{{product.PRODUCT_NAME}}</span>
          <span class="w02 tr font_gray">× {{product.NUM}}</span>
        </ion-label>
      </ion-item>
      <div class="jl_line"></div>
    </ng-container>
  </ion-list>
  <div *ngIf="datasConfig.isEnd==true" class="w12 mt20 mb20 tc font_gray">------------------------ 已经到底了
    ------------------------
  </div>
  <ion-infinite-scroll (ionInfinite)="getMoreDatas($event)" threshold="100px" [enabled]="!datasConfig.isEnd">
    <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="数据加载中...">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>
